package homework.homework_6;

/**
 * @author 朱
 * @date 2019032819:16
 */

import java.util.Scanner;

/**
 * 2、字符串反转
 * 举例：键盘录入”abc”	输出结果：”cba”
 */
public class Flip {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String flip1=scanner.nextLine();
        flip1.toCharArray();
        StringBuffer flip=new StringBuffer(flip1);
        flip.reverse();
        System.out.println("反转后的字符串是"+flip);
    }
}
